package arabicScrabble;

import java.util.LinkedList;

public class Linkword {
	
	LinkedList<Letter> l;
	String word;
	boolean first = true;
	public Letter mid;
	//the first letter inserted in the linkedList
	
	
	public Linkword(){
		l=new LinkedList<Letter>();
		word="";
	}
	
	public String getWord(){
		return word;
	}
	
	public void addToWord(char c){
		word=word+c;
	}
	
	public boolean add(Letter e){
		l.add(e);
		if(first){
		mid=e;
			first=false;
		}
		return true;
	}
	
	
	public void addLast(Letter e){
		l.add(e);
		if(first){
		mid=e;
			first=false;
		}
		
	}
	
	public void addFirst(Letter e){
		l.add(e);
		if(first){
		mid=e;
			first=false;
		}
		
	}
	
}
